package com.akilesa.dictcreator;

/**
 * Created by IntelliJ IDEA.
 * User: akilesa
 * Date: 20.01.2010
 * Time: 13:28:25
 * To change this template use File | Settings | File Templates.
 */
public class AnkiCard {
    private String question=" ";
    private String answer=" ";

    public AnkiCard() {
    }

    public AnkiCard(String question, String answer) {
        this.question = question;
        this.answer = answer;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AnkiCard ankiCard = (AnkiCard) o;

        if (answer != null ? !answer.equals(ankiCard.answer) : ankiCard.answer != null) return false;
        if (question != null ? !question.equals(ankiCard.question) : ankiCard.question != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = question != null ? question.hashCode() : 0;
        result = 31 * result + (answer != null ? answer.hashCode() : 0);
        return result;
    }
}
